import request from "@/utils/request"
//组织管理
//查询组织
export function zuzhi(payload = {}) {
    return request.get("/yanzuzhi", { params: payload })
}

//新增组织
export function addzuzhi(payload = {}) {
    return request.post("/yanzuzhi", payload)
}

//删除组织
export function delzuzhi(payload = {}) {
    return request.delete("/yanzuzhi/" + payload, payload)
}

//编辑组织
export function exitzuzhi(payload:any = {}) {
    return request.patch("/yanzuzhi/" + payload.id, payload)
}

//岗位管理-------------------------------------------------------------------------------
//查询岗位
export function gangwei(payload = {}) {
    return request.get("/yangangwei", { params: payload })
}

//新增岗位
export function addgangwei(payload = {}) {
    return request.post("/yangangwei", payload)
}

//删除岗位
export function delgangwei(payload = {}) {
    return request.delete("/yangangwei/" + payload, payload)
}

//修改岗位信息
export function changegangwei(payload:any = {}) {
    return request.patch("/yangangwei/" + payload.id, payload)
}

//职务管理-------------------------------------------------------------------------------------
//查询职务
export function search_zhiwu(payload = {}) {
    return request.get("/yanzhiwu", { params: payload })
}

//新增职务
export function add_zhiwu(payload = {}) {
    return request.post("/yanzhiwu", payload)
}

//删除职务
export function del_zhiwu(payload = {}) {
    return request.delete("/yanzhiwu/" + payload, payload)
}

//修改职务信息
export function change_zhiwu(payload:any = {}) {
    return request.patch("/yanzhiwu/" + payload.id, payload)
}